import request from '@/utils/request'

//留样销毁---申请
export function sampleCreate(data) {
  return request({
    url: '/reserve-sample/destroy/apply/create',
    method: 'post',
    data
  })
}

//留样销毁---申请列表
export function sampleList(data) {
  return request({
    url: '/reserve-sample/destroy/apply/list',
    method: 'post',
    data
  })
}

//留样销毁---申请详情
export function sampleDetail(id) {
  return request({
    url: `/reserve-sample/destroy/apply/detail?id=${id}`,
    method: 'GET'
  })
}

//留样销毁---申请详情 f_id
export function approvalDetail(id) {
  return request({
    url: `/reserve-sample/destroy/apply/flow-id/detail?id=${id}`,
    method: 'GET'
  })
}

//留样销毁---申请审批
export function approvalCheck(data) {
  return request({
    url: `/reserve-sample/destroy/apply/check`,
    method: 'put',
    data
  })
}

//留样销毁---写报告
export function sampleReport(data) {
  return request({
    url: `/reserve-sample/destroy/apply/do/report`,
    method: 'put',
    data
  })
}

//留样销毁---确认销毁
export function sampleConfirm(id) {
  return request({
    url: `/reserve-sample/destroy/apply/confirm?id=${id}`,
    method: 'GET'
  })
}

//留样销毁---获取所有创建人下拉列表
export function sampleAll() {
  return request({
    url: `/reserve-sample/destroy/apply/all/creator`,
    method: 'GET'
  })
}

//留样销毁---获取所有销毁样品的项目下拉列表
export function sampleAllProject() {
  return request({
    url: `/reserve-sample/destroy/apply/all/project`,
    method: 'GET'
  })
}

//留样销毁---明细列表
export function sampleDestroy(data) {
  return request({
    url: '/reserve-sample/destroy/apply/detail/list',
    method: 'post',
    data
  })
}

//留样销毁---确认销毁
export function destroyDetail(id) {
  return request({
    url: `/reserve-sample/destroy/apply/sample/detail?id=${id}`,
    method: 'GET'
  })
}

//留样销毁---明细列表获取所有操作人
export function destroyUse() {
  return request({
    url: `/reserve-sample/destroy/apply/all/destroy-user`,
    method: 'GET'
  })
}

//留样销毁--销毁人，监督人
export function destroyPeople() {
  return request({
    url: `/sys/user/group-by-department/list`,
    method: 'GET'
  })
}

//留样记录操作
export function history(data) {
  return request({
    url: `/reserve-sample/history`,
    method: 'post',
    data
  })
}

//留样销毁----编辑
export function destroyEdit(data) {
  return request({
    url: `/reserve-sample/destroy/back/update`,
    method: 'post',
    data
  })
}

